' Conversion
' A program that converts centimeters to inches and then to feet.

' A function to convert centimeters to inches.
DEF FNCentToInch!(cent!) = cent! / 2.54

' A function to round numbers to two decimal places.
DEF FNRound!(num!) = INT(100 * num! + .5) / 100

CLS

PRINT "This program converts centimeters to inches and then to feet."
PRINT
PRINT "Centimeters", "Inches", "Feet"
PRINT

FOR i% = 10 TO 100 STEP 10              ' do 10 conversions
    inches! = FNCentToInch!(i%)              ' convert centimeters to inches
    PRINT i%, FNRound!(inches!), FNRound(inches! / 12)   ' print results
NEXT i%

PRINT
INPUT "Press Return to continue", dummy$     ' pause screen
